package com.springmvc01.demo.controller;

import com.springmvc01.demo.pojo.Book;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@Controller
@ResponseBody
@RequestMapping("/book")
public class BookController {

    @RequestMapping("/add")
    public String addBook(Book book, Model model) {
        System.out.println("ADD------" + book);
        return book.toString();
    }
}
